//
//  LaylorBorderWidthTestViewController.m
//  CoreAnimation
//
//  Created by 张国文 on 16/10/9.
//  Copyright © 2016年 hangzhouyijiyin. All rights reserved.
//

#import "LaylorBorderWidthTestViewController.h"

@interface LaylorBorderWidthTestViewController ()

@end

@implementation LaylorBorderWidthTestViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    
    // 结论，边框是绘制在图层边界里面的，而且在所有子内容之前，也在子图层之前。就是说redView的高度还是50
    UIView *redView = [[UIView alloc] initWithFrame:CGRectMake(20, 100, 100, 50)];
    redView.backgroundColor = [UIColor redColor];
    redView.layer.borderColor = [UIColor yellowColor].CGColor;
    redView.layer.borderWidth = 5;
    [self.view addSubview:redView];
    
    UIView *blueView = [[UIView alloc] initWithFrame:CGRectMake(150, 100, 100, 50)];
    blueView.backgroundColor = [UIColor blueColor];
    [self.view addSubview:blueView];
}


@end
